<template>
  <div class="demo">
    <h2>学校名称：{{ name }}</h2>
    <h2>学校地址：{{ address }}</h2>
    <button @click="showName()">提示学校名字</button>
    <MyButton>1</MyButton>
    <my-button>2</my-button>
  </div>
</template>

<script>
import MyButton from "@/views/MyButton.vue";

export default {
  name: "School",
  data() {
    return {
      name: "理工",
      address: "莲华校区",
    };
  },
  methods: {
    showName() {
      console.log(this);
      alert(this.name);
    },
  },
  components: {
    MyButton,
  },
};
</script>

<style scoped>
.demo {
  background-color: yellow;
}
</style>